<?php
class CRequiredValidator extends CValidator{
	protected function validateAttribute($object,$attribute,$value){
		$value = $value[$attribute];
		if($this->isEmpty($value,true)){
			$message = $this->message !==null ? $this->message : $attribute."不能为空";
			$this->addError($object, $attribute, $message);
		}
	} 
}